package com.ruoyi.hotel.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hotel.mapper.HotelRoomListHistoryMapper;
import com.ruoyi.hotel.domain.HotelRoomListHistory;
import com.ruoyi.hotel.service.IHotelRoomListHistoryService;

/**
 * 酒店历史价格表Service业务层处理
 *
 * @author iis
 * @date 2024-02-29
 */
@Service
public class HotelRoomListHistoryServiceImpl implements IHotelRoomListHistoryService
{
    @Autowired
    private HotelRoomListHistoryMapper hotelRoomListHistoryMapper;

    /**
     * 查询酒店历史价格表
     *
     * @param id 酒店历史价格表主键
     * @return 酒店历史价格表
     */
    @Override
    public HotelRoomListHistory selectHotelRoomListHistoryById(Long id)
    {
        return hotelRoomListHistoryMapper.selectHotelRoomListHistoryById(id);
    }

    /**
     * 查询酒店历史价格表列表
     *
     * @param hotelRoomListHistory 酒店历史价格表
     * @return 酒店历史价格表
     */
    @Override
    public List<HotelRoomListHistory> selectHotelRoomListHistoryList(HotelRoomListHistory hotelRoomListHistory)
    {
        return hotelRoomListHistoryMapper.selectHotelRoomListHistoryList(hotelRoomListHistory);
    }

    /**
     * 新增酒店历史价格表
     *
     * @param hotelRoomListHistory 酒店历史价格表
     * @return 结果
     */
    @Override
    public int insertHotelRoomListHistory(HotelRoomListHistory hotelRoomListHistory)
    {
        hotelRoomListHistory.setCreateTime(DateUtils.getNowDate());
        return hotelRoomListHistoryMapper.insertHotelRoomListHistory(hotelRoomListHistory);
    }

    /**
     * 修改酒店历史价格表
     *
     * @param hotelRoomListHistory 酒店历史价格表
     * @return 结果
     */
    @Override
    public int updateHotelRoomListHistory(HotelRoomListHistory hotelRoomListHistory)
    {
        hotelRoomListHistory.setUpdateTime(DateUtils.getNowDate());
        return hotelRoomListHistoryMapper.updateHotelRoomListHistory(hotelRoomListHistory);
    }

    /**
     * 批量删除酒店历史价格表
     *
     * @param ids 需要删除的酒店历史价格表主键
     * @return 结果
     */
    @Override
    public int deleteHotelRoomListHistoryByIds(Long[] ids)
    {
        return hotelRoomListHistoryMapper.deleteHotelRoomListHistoryByIds(ids);
    }

    /**
     * 删除酒店历史价格表信息
     *
     * @param id 酒店历史价格表主键
     * @return 结果
     */
    @Override
    public int deleteHotelRoomListHistoryById(Long id)
    {
        return hotelRoomListHistoryMapper.deleteHotelRoomListHistoryById(id);
    }
}
